<div id="previewpane">
  <div class="work-show">
    <%= render :partial => 'works/work_header' -%>
  	<%=
    	if @work.chaptered? || (@chapters.size > 1)
				render :partial => 'chapters/chapter', :locals => {:chapter => @chapter}
			else
				sanitize_and_format_for_display(@chapter.content)
			end
		-%>
  	<%= render :partial => 'works/work_footer' -%>
  </div>
</div>

<%- form_for(@work) do |f| -%>

  <%= render :partial => 'hidden_fields', :locals => {:form => f} -%>

  <fieldset>
    <legend><%= "Post Work".t -%></legend>
    <p class="submit">
  	<% if @work.posted? %>
  		<%= submit_tag 'Update'.t, :name => 'update_button' %>
  	<% else %>
  		<%= submit_tag 'Post'.t, :name => 'post_button' %>
  	<% end %>
      <%= submit_tag 'Edit'.t, :name => 'edit_button' %>
      <%= submit_tag 'Cancel'.t, :name => 'cancel_button' %> 
    </p>
  </fieldset>

<% end %>
